<%@ page language="java" pageEncoding="utf-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <meta http-equiv="pragma" content="no-cache"/>
    <meta http-equiv="cache-control" content="no-cache"/>
    <meta http-equiv="expires" content="0"/>
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
    <meta http-equiv="description" content="This is my page"/>
    <link href="${pageContext.request.contextPath}/static/css/daoke.css" rel="stylesheet" type="text/css"
          media="screen"/>

    <script language="javascript">
        function check1() {
            if (document.ThisForm.userName.value == "") {
                alert("请输入用户名");
                document.ThisForm.userName.focus();
                return false;
            }
            if (document.ThisForm.password.value == "") {
                alert("请输入密码");
                document.ThisForm.password.focus();
                return false;
            }
            document.ThisForm.submit();
        }

        function callback(data) {
            document.getElementById("indicator").style.display = "none";
            if (data == "no") {
                alert("用户名或密码错误");
            }
            if (data == "yes") {
                alert("通过验证,系统登录成功");
                window.location.href = "${pageContext.request.contextPath}/loginSuccess.jsp";
            }

        }
    </script>

    <style type="text/css">
        .login_form {
            width: 600px;
            height: 250px;
            background: url(/static/images/login_bg.png) no-repeat center top;
            margin: 20px 0 0 145px;
            float: left;
            padding: 0px 0 0 0px;
        }

        body {

            <%--background: url(${pageContext.request.contextPath}/static/images/1.png) no-repeat;--%>
            background: -webkit-linear-gradient(#A5DBFE,#FFFFFF);
            font-family: Arial, Helvetica, sans-serif;
            padding: 0;
            font-size: 12px;
            margin: 0 auto;
            color: #0e4354;
        }


        #main_container {
            margin: 0 auto;
            width: 900px;
            padding: 0px 0 0px 0;
        }

    </style>
</head>

<body>
<div class="wrap" >
    <div class="tab" style="">
        <div class="tab-title">
            <div class="tab-menu " style="position: relative;z-index: 5;border-bottom: 4px solid #3395ab;font-size: 30px;">后台登录</div>
        </div>
        <div class="pos-r" style="width: 500px;height: 2px;background: #bbbbbb;top: -4px;"></div>
        <div class="tab-cont">



    <div class="header_login">
        <div class="logo" style="height: 130px;"></div>

    </div>


<%--    <div class="login_form">--%>

        <h3></h3>

        <a href="#" class="forgot_pass"></a>

        <form action="${pageContext.request.contextPath}/login.html" method="post" class="niceform"
              name="ThisForm" style="margin-top: -175px;">

            <table align="center" border="0" cellpadding="2" cellspacing="2" style="margin-top: 50px;">
                <tr align='center' style="height: 30px;">
                    <td style="width: 60px;font-size: 18px;" align="center">
                        账号：
                    </td>
                    <td align="left">
                        <input name="userName" type="text" style="width: 330px;"/>
                    </td>
                </tr>
                <tr align='center' style="height: 30px;font-size: 18px;">
                    <td style="width: 60px;font-size: 18px;" align="center">
                        密码：
                    </td>
                    <td align="left">
                        <input name="password" type="password" style="width: 330px;height: 30px;"/>
                    </td>
                </tr>
                <tr align='center' style="height: 30px;">
                    <td style="width: 60px;font-size: 18px;" align="center">
                        身份：
                    </td>
                    <td align="left">
                        <select name="role" id="role" style="width: 330px;font-size: 14px;" class="select">
                            <option value="1">系统管理员</option>
                            <option value="2">医生</option>

                        </select>
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2" height="10"><font color="red">${errInfo}</font>
                    </td>
                </tr>

                <tr align='center'>
                    <td style="width: 60px;" align="center"></td>
                    <td align="left">
                        <input type="button" value="登陆" style="width: 80px;background: #3b8cff;" onclick="check1()" class="login-btn"/>&nbsp;
                        <input type="reset" value="重置" style="width: 80px;background: #3b8cff;" class="login-btn"/>&nbsp;
                        <img id="indicator" src="${pageContext.request.contextPath}/static/img/loading.gif"
                             style="display:none"/>
                    </td>
                </tr>
            </table>

        </form>
<%--    </div>--%>


</div>
</div>
</div>

</body>
</html>
